<?php
/* @var $this ConatactController */

$this->pageTitle=Yii::app()->name . ' - Contact Us';
$this->breadcrumbs=array(
	'Contact',
);
$count = $model->count('IsActive = 1 AND art_cat_id = 4');
$pages = new CPagination($count);
$pages->pageSize = 2;
$pages->route = '/lien-he';
?>
<div  id="<?php echo $this->id . '-' . $this->action->id?>" class="main-content">
   <ul class="list-contact">
      <?php
         if(count($list) > 0){
            
            foreach($list as $item){
               $url = str_replace(' ','-',CVietnameseTools::makeSearchableStr($item['art_title'])).'-'.$item['art_id'].'.html';
               $string = new String($item['art_content']);
               $summary = $string->summary(0,250).' ...';
               ?>
               <li class="contact-item">
                  <h3 class="title"><?php echo $item['art_title']?></h3>
                  <div class="summary">
                     <?php echo $summary?> 
                  </div>
                  <div class="text-right">
                     <a class="read-more" href="<?php echo Yii::app()->request->hostInfo.'/lien-he/'.$url?>">Đọc thêm...</a>
                  </div>
               </li>
            <?php }
         }
      ?>
   </ul>
   <?php $this->widget('CLinkPager', array(
    'pages' => $pages,
    'header' => '',
    'nextPageLabel' => 'Sau',
    'prevPageLabel' => 'Trước',
   )) ?>
</div>